package com.lagou.demo.controller;

import com.lagou.demo.service.IDemoService;
import com.lagou.edu.mvcframework.annotations.LagouAutowired;
import com.lagou.edu.mvcframework.annotations.LagouController;
import com.lagou.edu.mvcframework.annotations.LagouRequestMapping;
import com.lagou.edu.mvcframework.annotations.Security;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@LagouController
@LagouRequestMapping("/wmx")
public class WmxController {

    @LagouAutowired
    private IDemoService demoService;

    @LagouRequestMapping("/query")
    @Security(value = {"userName3", "userName4"})
    public String query(HttpServletRequest request, HttpServletResponse response, String name) {
        return demoService.get(name);
    }

    @LagouRequestMapping("/method1")
    public String method1(HttpServletRequest request, HttpServletResponse response, String name) {
        return demoService.get(name);
    }
}
